import request from '@/utils/request'
import { path_platform } from '@/api/gateway'

// 查询隐私协议服务
export function getProtocol(data) {
  return request({
    url: path_platform + '/protocol/getProtocol',
    method: 'get',
    params: data,
  })
}

// 注册用户账号服务
export function registerAccount(data) {
  return request({
    url: path_platform + '/user/registerAccount',
    method: 'post',
    data: data,
  })
}

// 登录用户账号服务
export function loginAccount(data) {
  return request({
    url: path_platform + '/user/loginAccount',
    method: 'post',
    data: data,
  })
}

// 发送验证码服务
export function sendCaptcha(data) {
  return request({
    url: path_platform + '/captcha/sendCaptcha',
    method: 'post',
    data: data,
  })
}
// 验证码校验
export function checkCaptcha(data) {
  return request({
    url: path_platform + '/captcha/checkCaptcha',
    method: 'post',
    data: data,
  })
}

// 忘记密码
export function saveAccountPassword(data) {
  return request({
    url: path_platform + '/user/saveAccountPassword',
    method: 'post',
    data: data,
  })
}
// 修改手机号
export function saveAccountPhone(data) {
  return request({
    url: path_platform + '/user/saveAccountPhone',
    method: 'post',
    data: data,
  })
}
// 查询用户详情
export function getUser(data) {
  return request({
    url: path_platform + '/user/getUser',
    method: 'get',
    params: data,
  })
}
//核验手机号服务
export function checkPhone(data) {
  return request({
    url: path_platform + '/user/checkPhone',
    method: 'get',
    params: data,
  })
}
